﻿<html>
<head>
<link href="css/qam.css" rel="stylesheet" media="screen" />
</head>
<body>

	<div style="width:960px;margin:0 auto">
		<div id="message" style="height:20px;line-height:22px;background:#FFF2D5;border:#FAC555 solid 1px;color:#828685;padding-left:20px;" ></div>
		
		<HR><h3>用户登陆</h3>
		<div style="padding:10px;background:#E8E8FF;margin-top:10px;">
			<form method="post" action="#" name="myform" class="myform">
				<input type="hidden" value="" name="id" />
				<label><span>用户名：</span><input type="text" value="" name="name" /></label><BR />
				<label><span>密码：</span><input type="text" value="" name="passwd" /></label><BR />
				<input type="button" value="登陆" onclick="login();" name="button"  />
			</form>
		</div>

	</div>



</body>

<script src="js/ajax.js" type="text/javascript"></script>
<script src="js/md5.js" type="text/javascript"></script>
<script src="js/function.js" type="text/javascript"></script>
<script>



function init(){}



/*****login********/
function login(){
	var _url=cgipath+"user-login";
	var ajax_obj=new AJAX_OBJ(_url,handle_login,handle_error,5000);
	
	var passwd=document.myform.passwd;
	var passwd_temp=passwd.value
	if(passwd_temp.length>0)passwd.value=hex_md5(passwd_temp);//md5加密
	
	ajax_obj.postData(formToString(document.myform));
	
	passwd.value=passwd_temp;//md5加密
}
function handle_login(xmlHttp){
	//$$("message").innerHTML=xmlHttp.responseText;return;
	eval("var ret_json="+xmlHttp.responseText);
	$$("message").innerHTML="【ret】"+ret_json.ret+"【msg】"+ret_json.msg;
	parent.location.reload(); 
}
</script>
<script src="js/public.js" type="text/javascript"></script>


</html>